package com.helper.easyHelper.model;

import com.helper.easyHelper.common.entity.Table;
import com.helper.easyHelper.utils.FreeMakerUtil;
import com.helper.easyHelper.utils.MySQLUtils;

/**
 * @author 狠穿
 * @version 1.0.0
 * @date 2023/1/29
 */
public class ModelHelper {

    public static void generateModel(String tableName,String outputDir){
        Table table = MySQLUtils.getTableInfo(tableName);
        FreeMakerUtil.generateFile(table,outputDir,"model.java.ftl",table.getModelName());
    }

    public static void main(String[] args) {
        generateModel("t01_device_type","src/main/resources/output");
    }
}
